﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;

namespace BiessesXmlReader
{
   public class Solution
    {
       public List<Pattern> Patterns { get;private set; }
       public List<Piece> Pieces { get;private set; }
       public string Kerf { get;private set; }
       public string Scrap { get;private set; }
       public Solution()
       {
           List<Pattern> Patterns = new List<Pattern>();
           List<Piece> Pieces = new List<Piece>();
       }
       public static Solution GetSolution(XElement x)
       {
           Solution s = new Solution();
           s.Patterns = Pattern.GetPatterns(x.Element("Solution"));
           s.Pieces = Piece.GetPieces(x.Element("Solution"));
           return s;
       }
    }
}
